package com.team7.happycommunity.propertymanagement.dao;

import com.team7.happycommunity.propertymanagement.pojo.OwnerParkingApply;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface OwnerParkingApplyMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(OwnerParkingApply record);

    int insertSelective(OwnerParkingApply record);

    OwnerParkingApply selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(OwnerParkingApply record);

    int updateByPrimaryKey(OwnerParkingApply record);


    @Select("select owner_parking_apply.*,person_user.cell_ph_number cellphone,person_user.name name from owner_parking_apply" +
            " left join person_user on owner_parking_apply.owner_id = person_user.id where community_id = #{areaid} and status = 0")
    List<OwnerParkingApply> getAll(@Param("currentPage")Integer currentPage, @Param("pageSize") Integer pageSize, @Param("areaid") Integer areaid);

}